package com.lrs.java.j2se_advanced.codec;

public class CharsetUTF8Test {

	public static void main(String[] args) throws Exception {
//		String srcStr = "待转换字符串";
//		byte[] a = srcStr.getBytes("utf-8");
//		for (int i = 0; i < a.length; i++) {
//			System.out.print(a[i] + " ");
//		}
//		System.out.println(" length: " + srcStr.getBytes().length);

		String test = "1abc";
		// char[] chars = srcStr.toCharArray();
		byte[] chars = test.getBytes();
		for (int i = 0; i < chars.length; i++) {
			System.out.print(chars[i] + " ");
		}
		
//		System.out.println(Integer.toBinaryString(16)); 
		
		byte[] a = {0x31, 97, 98, 99};
//		byte[] hex = []
		System.out.println(new String(a));
		
		
		byte b = 0x19;
		System.out.println(b);
		
		
		
	}
}